<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>jQuery Migrate late load event binding test</title>
	<script src="../node_modules/native-promise-only/lib/npo.src.js"></script>

	<!-- Load a jQuery and jquery-migrate plugin file based on URL -->
	<script src="testinit.js"></script>
	<script>
		TestManager.loadProject( "jquery", "git" );
	</script>
	<script src="iframeTest.js"></script>
	<script>
		jQuery.noConflict();
		TestManager.loadProject( "jquery-migrate", "dev", true );
	</script>
	<script>
		var resolve,
			loaded = new Promise( function ( _resolve ) {
				resolve = _resolve;
			} );

		// No warning here, document isn't yet loaded
		jQuery( window ).on( "load", function() {
			resolve();
		});

		Promise.all( [ jQuery.ready, loaded ] ).then( function() {

			// This .on() call should warn
			jQuery( window ).on( "load", jQuery.noop );

			startIframeTest();
		} );
	</script>
</head>
<body>
	<p>jQuery Migrate late load event binding test</p>
</body>
</html>
